package com.foreknow.demo2;

/**
 * for循环
 */
public class LoopDemo1 {
    public static void main(String[] args) {
        int sum = 0;
        for (int i = 1;i<=10;i++) {
            sum += i; // sum = sum + i;
        }
        System.out.println("i的值是: "+ sum);

    }
}
